<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/"
      py:strip="">


<py:choose test="">
 <py:when test="run">
	<table class="listing" id="tc_steplist-1">
	 <thead>
	  <tr>
		<th>Order</th><th>Pass</th><th>Fail</th><th>N/A</th><th>Testing Activity</th><th>Expected Result</th>
	  </tr>
	 </thead>
			<!-- !<tr py:for="step in run" id="${run.case_id}" > -->
	  <tr py:for="step in run" id="row_${step.case_id}" >
	  <td width="30px"  >${step.test_order}</td>
	  <td width="10px" id="td_step_pass"  ><input type="radio" id="step_pass"  name="${step.case_id}" value="pass" reg_num="${reg}"  /></td>
	  <td width="10px" id="td_step_fail" ><input type="radio" id="step_fail"  name="${step.case_id}" value="fail" reg_num="${reg}" step_num="${step.test_order}" /></td>
	  <td width="10px"><input type="radio" id="step_na" name="${step.case_id}" checked="true" value="untested" reg_num="${reg}"/></td>
	  <td id="${step.case_id}_activity">
		  <div id="_namegrp">
			  <label id="_namelbl">${step.item_name}</label>
		 </div>
		 <div id="_proceduregrp">
		 	<label id="_lbl">Test Procedure</label>
			</div><div>
		 	${step.test_procedure}
		 	</div>
	 </td>
	 <td id="${step.case_id}_expected">${step.expected_result}</td>	
	</tr>
	</table>
 </py:when>
 
 <py:when test="case">
 		<table class="listing" id="tc_steplist-1">
        <thead>
          <tr>
          	<py:if test="edit">
          		
			<th >Remove</th>
			<!--
			<script> 
			  $(document).ready(function() {
		
		 		$("tr").click(function() {
				
					step_id = $(this).attr('id');
					alert("Row clicked" + step_id); 
			
				});
		 
		 	});
 			</script>
			-->
			</py:if>
			<th>Order</th><th>Testing Activity</th><th>Expected Result</th>
		  </tr>
        </thead>
		<tr py:for="step in case" id="${step.case_id}">
				
				<py:if test="edit">
				<td width="10px"><input type="checkbox" name="test_case_step_id" value="${step.case_id}"/></td>
				</py:if>			
        		<td width="10px">${step.test_order}</td>
				<td >	
		  <div id="_namegrp">
			 <label id="_namelbl">${step.item_name}</label>
		 </div>
		 <div id="_proceduregrp">
		 <label id="_lbl">Test Procedure</label>
			</div><div>
		 	${step.test_procedure}
		 	
		 </div>
				</td>
				<td>${step.expected_result}</td>
        </tr>
      </table>
 </py:when> 	
 <py:otherwise>
 	Nothing to see here
 </py:otherwise>
 
</py:choose>		
	
    	
		
</html>